package updater.currency.data;

public class Currency {
	private String name;
	private String symbol;
	private double price;
	private String date;

	
	public void setCurrency(String from, String symbol, String pubDate,
			String price) {
	
		setName(from);
		setSymbol(symbol);
		setPrice(price);
		setDate(pubDate);
		
	}
	
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSymbol() {
		return symbol;
	}

	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(String strings) {

		try {
			double d = (new Double(strings)).doubleValue();
		
			this.price = d;
		} catch (NumberFormatException e) {
			System.out.println("s is not a number");
		}
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

}
